package entity.weapons;

import java.awt.Graphics2D;

import loading.ImageLoader;
import main.GameList;
import math.Vector2D;
import entity.Entity;

public class Item extends Entity
{
	private String name;
	private ImageLoader icon;
	
	//This variable indicates if the item is to be drawn on the map based on its position or 
	//if it is not to be drawn because it is in the inventory, etc.
	private boolean isEntity;
	
	public Item( String name, Vector2D pos, ImageLoader icon, ImageLoader img )
	{
		super( pos, img );
		
		this.name = name;
		this.icon = icon;
		isEntity = true;
	}
	
	protected ImageLoader getIcon()
	{
		return icon;
	}
	
	public String getName()
	{
		return name;
	}
	
	public boolean getIsEntity()
	{
		return isEntity;
	}
	
	public void setIsEntity( boolean b )
	{
		isEntity = b;
	}
	
	public void draw( Graphics2D g )
	{
		if( isEntity )
			super.draw( g ); 
	}
}
